from dependencies.myRabbitmq.amqpUtil import AMQPUtil


class RabbitPublisher(AMQPUtil):

    def __init__(self):
        super(RabbitPublisher, self).__init__()

    @classmethod
    def run(cls, routing_key, msg, exchange, delay=None, TTL=None):
        publish = cls()
        publish.publish_message(routing_key, msg, exchange, delay, TTL)
        print("message send out")
